<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!<DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="/style/basic_layout.css" rel="stylesheet" type="text/css">
    <link href="/style/common_style.css" rel="stylesheet" type="text/css">
    <link href="/js/plugins/fancyBox/jquery.fancybox.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/artDialog/jquery.artDialog.js?skin=blue"></script>
    <script type="text/javascript" src="/js/plugins/artDialog/plugins/iframeTools.js"></script>
    <script type="text/javascript" src="/js/plugins/fancyBox/jquery.fancybox.js"></script>
    <script type="text/javascript" src="/js/commonAll.js"></script>
    <title>叩丁狼教育PSS（演示版）-账户管理</title>
    <style>
        .alt td {
            background: black !important;
        }
    </style>
    <script>
        $(function () {
            //图片弹出层
            $(".fancybox").fancybox();
            //关闭窗口并且回传数据
            $(".select").click(function () {
                //获得数据
                var json =$(this).data("json");                                
                //回传数据
                $.dialog.data("json",json);
                //关闭窗口
                   $.dialog.close();
            })
        })
    </script>
</head>
<body>
<form id="searchForm" action=/product/list.do method="post">
    <div id="container">
        <div class="ui_content">
            <div class="ui_text_indent">
                <div id="box_border">
                    <div id="box_top">搜索</div>
                    <div id="box_center">
                        关键字
                        <input type="text" class="ui_input_txt02" name="keyword" value="${qo.keyword}"/>
                        品牌
                        <select class="ui_select01" name="brandno">
                            <option value="-1">请选择</option>
                            <c:forEach items="${brands}" var="brands">
                                <option value="${brands.id}"${brand.id == qo.brandno ? "selected" : ''}>${brands.name}</option>
                            </c:forEach>
                        </select>
                    </div>
                    <div id="box_bottom">
                        <input type="button" value="查询" class="ui_input_btn01 btn_select"/>
                        <input type="button" value="新增" class="ui_input_btn01 btn_input btn_url"
                               data-url="/product/input.do"/>

                    </div>
                </div>
            </div>
        </div>
        <div class="ui_content">
            <div class="ui_tb">
                <table class="table" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                    <tr>
                        <th width="30"><input type="checkbox" id="all"/></th>
                        <th>图片</th>
                        <th>编号</th>
                        <th>商品名</th>
                        <th>品牌</th>
                        <th>商品编号</th>
                        <th>成本价</th>
                        <th>销售价</th>
                        <%--<th>备注</th>--%>
                        <th></th>
                    </tr>
                    <tbody>
                    <c:forEach items="${result.data}" var="data">
                        <tr>
                            <td><input type="checkbox" name="IDCheck" class="acb" data-eid="${data.id}"/></td>
                            <td><a class="fancybox" href="${data.imagePath}" data-fancybox-group="gallery" title="Lorem ipsum dolor sit amet">
                                <img src=${data.smallImagePath} alt="" class="list_img_min"/></a>
                            </td>
                            <td>${data.id}</td>
                            <td>${data.name}</td>
                            <td>${data.brandName}</td>
                            <td>${data.sn}</td>
                            <td>${data.costPrice}</td>
                            <td>${data.salePrice}</td>
                            <td>
                                <input type="button" value="选择该条" data-json='${data.json}' class="left2right select"/>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
            <div class="ui_tb_h30">
                <%@include file="../common/common.jsp" %>
            </div>
        </div>
    </div>
</form>
</body>
</html>
